﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using Domain.MainModule.Entities;

namespace Infrastructure.Data.MainModule.MainModule.Mapping
{
    public class CustomersEntityConfiguration : EntityTypeConfiguration<Customers>
    {
        public CustomersEntityConfiguration()
        {
            this.HasKey(u => u.CustomerId);
            this.Property(u => u.CustomerId).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
            this.Property(u => u.CustomerName).IsRequired().HasMaxLength(15);
            this.Property(u => u.AuthorizationId).IsRequired().HasMaxLength(255);
            this.Property(u => u.CustomerEmail).HasMaxLength(50);
            this.Property(u => u.CustomerPassword).HasMaxLength(10);
            this.Property(u => u.IsActive).IsRequired();
            this.Property(u => u.IsRegister).IsRequired();
        }

    }
}
